﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using Project.MVC.DataAccess;
@using Webdiyer.WebControls.Mvc;
@using Project.MVC.Admin.Models;
@model ProductModel

<div id="toolbar-box">
    <div class="t">
        <div class="t">
            <div class="t">
            </div>
        </div>
    </div>
    <div class="m">
        <div class="toolbar-list" id="toolbar">
            <ul>
                <li id="toolbar-new" class="button"><a href="Product/Add" class="toolbar"><span class="icon-32-new"
                    title="Thêm"></span>Thêm </a></li>
                @*<li id="toolbar-new" class="button"><a href="News/Add" class="toolbar"><span class="icon-32-edit"
                    title="Thêm"></span>Sửa </a></li>
                <li id="toolbar-new" class="button"><a href="News/Add" class="toolbar"><span class="icon-32-delete"
                    title="Thêm"></span>Xóa </a></li>*@
            </ul>
        </div>
        <div class="pagetitle icon-48-generic">
            <h2>
                Tin tức</h2>
        </div>
        <div class="clr">
        </div>
    </div>
    <div class="b">
        <div class="b">
            <div class="b">
            </div>
        </div>
    </div>
</div>
<div class="clr">
</div>
<div id="element-box">
    <div class="t">
        <div class="t">
            <div class="t">
            </div>
        </div>
    </div>
    <div class="m">
        <table class="adminlist" cellspacing="1">
            <thead>
                <tr>
                    <th width="1%" class="title" align="left">
                        <a href="#">STT</a>
                    </th>
                    @*<th width="10%" nowrap="nowrap" align="left">
                        <a href="#">Hình ảnh</a>
                    </th>*@
                    <th nowrap="nowrap" align="left">
                        <a href="#">Tiêu đề</a>
                    </th>
                    <th nowrap="nowrap" align="left">
                        <a href="#">Sửa</a>
                    </th>
                    <th nowrap="nowrap" align="left">
                        <a href="#">Xóa</a>
                    </th>
                </tr>
            </thead>
            @for (int i = 0; Model.PageList != null && i < Model.PageList.Count; i++)
            {
                <tr class="row@(i % 2)">
                    <td align="center">
                        @(i + 1)
                    </td>
                    @*<td>
                        <img height="75px" width="75px" src="@Model.PageList[i].Image"/>
                    </td>*@
                    <td>
                        @Model.PageList[i].Name
                    </td>
                    <td align="center">
                        @Html.ActionLink("Sửa", "Edit", new { Controller = "Product", id = Model.PageList[i].Id })
                    </td>
                    <td align="center">
                        @Html.ActionLink("Xóa", "Delete", new { Controller = "Product", id = Model.PageList[i].Id })
                    </td>
                </tr>         
            }
            <tr align="center">
                <td colspan="5">
                    @Html.Pager(Model.PageList, new PagerOptions { PageIndexParameterName = "id" })
                </td>
            </tr>
        </table>
    </div>
    <div class="b">
        <div class="b">
            <div class="b">
            </div>
        </div>
    </div>
</div>

